`ifndef FIFO_AGENT__SV
`define FIFO_AGENT__SV
`include "fifo_driver.sv"
`include "fifo_monitor.sv"
`include "fifo_sequencer.sv"
`include "fifo_sequence.sv"
class fifo_agent extends uvm_agent;
  fifo_driver drv;
  fifo_monitor mon;
  fifo_sequencer sqr;
  
  `uvm_component_utils(fifo_agent)
  
  uvm_analysis_port#(fifo_transcation) ap;
  
  function new(string name ,uvm_component parent);
    super.new(name,parent);
  endfunction
  
  virtual function void build_phase(uvm_phase phase);
    super.build_phase(phase);
    drv = fifo_driver::type_id::create("drv",this);
	mon = fifo_monitor::type_id::create("mon",this);
	sqr = fifo_sequencer::type_id::create("sqr",this);
	//ap  = new("ap",this);
  endfunction
  
  virtual function void connect_phase(uvm_phase phase);
    super.connect_phase(phase);
	drv.seq_item_port.connect(sqr.seq_item_export);
	
	ap = mon.ap;
  endfunction
  
endclass

class fifo_agent_out extends uvm_agent;
  
  fifo_monitor_out mon_o;
  `uvm_component_utils(fifo_agent_out)
  
  function new(string name ,uvm_component parent);
    super.new(name,parent);
  endfunction
  
  virtual function void build_phase(uvm_phase phase);
    super.build_phase(phase);
    mon_o = fifo_monitor_out::type_id::create("mon_o",this);
  endfunction
endclass


`endif
